import { State } from "framework/FSM/AState";
 

/*
孵化PowerCreep
*/
export class State_Spawn<T extends IStateArg<PowerCreep>>  extends State<T>
{

    public  getActions(arg:T):Action[]
    {
        const core = arg.entity.getEntity("CoreEntity");
        if( core.PowerSpawn)
        {
            arg.entity.spawn(core.PowerSpawn);
            arg.entity.initAttributes();
        }
        else
        {
            arg.entity.log('warn',`此房间 ${ arg.entity.memory.OwnerRoom} 没有powerSpawn` );
        }
        return [];
    }

}
